<?php //print_r(  );  ?>
<div id="tabs" class="tabs">
    <ul class="tabs primary">
        <li><a href="#tabs-1">咨询顾问</a></li>
        <li><a href="#tabs-2">申请案例</a></li>
        <li><a href="#tabs-3">留学信息</a></li>
        <li><a href="#tabs-4">论坛</a></li>
    </ul>

    <div class="breakLine"></div>

    <a id="main-content"></a>
    <div id="tabs-1" class="tabs-pane">
        <?php
        foreach ($data['consultant'] as $item) {
            $url = url('node/' . $item->nid);
            $image_path = imagecache_create_url('picture_wall_item', $item->field_image[0]['filepath']);
        ?>
            <div class="itemConsultant item">
                <a class="picWallBg"><img alt="<?php print  $item->title;?>" src="<?php print $image_path?>" /></a>
                <div class="caption">
                    <a href="<?php print $url ?>"><?php print $item->title; ?></a>
                    <p><?php print $item->field_current_university[0][value]; ?></p>
                </div>
            </div>
<?php } ?>
    </div>
    <div id="tabs-2" class="tabs-pane">
        <?php
        foreach ($data['case'] as $item) {
            $url = url('node/' . $item->nid);
        ?>
            <div class="itemCase item">
            <p class="picWallBg">
                <span class="title"><?php print $item->title ?></span>
                <span class="shortLine">
<?php print $item->field_edu_bg[0][value]; ?>
                    <br />
                    GPA:<?php print $item->field_gpa[0][value]; ?>,
                    TOEFL:<?php print $item->field_toefl[0][value]; ?>,
                    GRE:<?php print $item->field_gre[0][value]; ?>,
                    GMAT:<?php print $item->field_gmat[0][value]; ?>
                </span>
            </p>
            <div class="caption">
                <a href="<?php print $url; ?>"><?php print $item->title; ?></a>
                <p> 申请结果: <br /> <?php print $item->field_admission[0][value]; ?></p>
            </div>
        </div>
<?php } ?>
    </div>
    <div id="tabs-3" class="tabs-pane">
        <?php
        foreach ($data['article'] as $item) {
            $url = url('node/' . $item->nid);
            $image_path = imagecache_create_url('picture_wall_item', $item->field_image[0]['filepath']);
        ?>
            <div class="itemNews item">
                <a class="picWallBg"><img alt="<?php print $item->title; ?>" src="<?php print $image_path; ?>" /></a>
                <div class="caption">
                    <a href="<?php print $url; ?>"><?php print $item->title; ?></a>
                    <p><?php print substr(_filter_html($item->body, NULL), 0, 60); ?> ... </p>
                </div>
            </div>
        <?php } ?>
    </div>
    <div id="tabs-4" class="tabs-pane">
        <?php
        foreach ($data['forum'] as $item) {
        ?>
            <div class="itemBBS item">
                <p class="picWallBg"><?php print $item->title; ?></p>
                <div class="caption">
                    <p><?php print substr(_filter_html($item->body, NULL), 0, 60); ?> ... </p>
                </div>
            </div>
<?php } ?>
    </div>

</div><!-- /#tab -->
<script>
    $(function() {
        $( "#tabs" ).tabs({fx: { opacity: 'toggle', duration: 1000 }});
    });

    $(document).ready(function() {
        //move the image in pixel
        var move = -15;
        //zoom percentage, 1.2 =120%
        var zoom = 1.2;
        var items = ['.itemConsultant','.itemCase',' .itemNews','.itemBBS'];
        //On mouse over those thumbnail
        for(var i=0; i<4; i++){
            $('.item').hover(function() {
                //Set the width and height according to the zoom percentage
                width = $('.item').width() * zoom;
                height = $('.item').height() * zoom;
                //Move and zoom the image
                //$(this).find('.picWallBg').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
                //Display the caption
                $(this).find('div.caption').stop(false, true).fadeIn(200);
            },
            function() {
                //Reset the image
                //$(this).find('.picWallBg').stop(false,true).animate({'width':$('.item').width(), 'height':$('.item').height(), 'top':'0', 'left':'0'}, {duration:100});
                //Hide the caption
                $(this).find('div.caption').stop(false, true).fadeOut(200);
            });
        }
    });

</script>
